package com.atguigu.day05;

import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int count;
        System.out.println("请输入本组学员的人数:");
        count = s.nextInt();
        String[] name = new String[count];
        for (int i = 0; i < count; i++) {
            System.out.println("请输入" + (i + 1) + "号学员的名字:");
            name[i] = s.next();
        }
        System.out.println("请输入要查找的学员名字:");
        String search = s.next();
        boolean isSearch = true;
        for (int i = 0; i < count; i++) {
            if (search.equals(name[i]))
                System.out.println("他的下标是" + i);
        }


    }
}
